﻿using System;
using System.Collections.Generic;
using System.Text;
using CharacterTrailLibrary.CustomModels;
using CharacterTrailLibrary.Persist.BLL.Model;

namespace CharacterTrailLibrary.Interface
{
    public interface IBom
    {
        void SaveBom(TBomMainModel bomMainModel, TBomEntryModel bomEntryModel);

        void DeleteBomEntry(TBomEntryModel bomEntryModel);

        void DeleteBomMainAndEntry(TBomMainModel bomMainModel);

        List<TBomMainModel> GetBomMainModels();

        List<TBomMainModel> GetBomMainModelsByCondition(string condition);

        List<VBomEntryAndMainModel> GetVBomEntryAndMainModelByCondition(string condition);

        TBomMainModel GetBomMainModel(int productItemId, string productVersion);

        TBomEntryModel GetBomEntryModel(int productItemId, string productVersion, int materialItemId);

        List<TBomEntryModel> GetBomEntryModelsByProduct(int  productItemId, string productVersion);

        List<TBomEntryModel> GetBomEntryModelsByProduct(int productItemId, string productVersion, string procedureNo);

        List<string> GetDistinctProductVersion(int productItemId);

        int GetMaxBomEntryIdx(int productItemId, string productVersion);

        List<TBomEntryModel> GetBomEntryModelsByCondition(string condition);

        void UpdateBomEntryModel(int productItemId, string productVersion, int materialItemId,
                                 TBomEntryModel bomEntryModel);

        void CheckBomMain(TBomMainModel bomMainModel);

        void UnCheckBomMain(TBomMainModel bomMainModel);

        List<ProductItemModel> BuildProductTree(int productItemId, string productVersion);

        List<ProductItemModel> BuildProductTree2(int productItemId, string productVersion);

    }
}
